package com.ftg.learn.day09.depency;

/**
 * 引用的四种方式   ：
 *
 * @author 布衣
 */
public class B {

    public static void main(String[] args) {
        A a1 = new A();

        B b1 = new B(a1);
//        b1.setA1(a1);
    }

    public B(){}

    /**
     * 依赖
     * @param a1
     */
    public B(A a1){
        this.a1 = a1;
    }

    A a1;

    public A getA1() {
        return a1;
    }

    public void setA1(A a1) {
        this.a1 = a1;
    }
    //static
}
